import request from '@/utils/request'

export async function nodePageQuery(node, paginator) {
  return await request({
    url: '/bicAdmin/node/query',
    method: 'post',
    data: {
      'node': node,
      'paginator': paginator
    }
  })
}

export async function nodeSave(node) {
  return await request({
    url: '/bicAdmin/node/save',
    method: 'post',
    data: node
  })
}

export async function remoteValidateNodeName(systemUuid, name) {
  return await request({
    url: '/bicAdmin/node/validateName/' + systemUuid + '/' + name,
    method: 'get',
  })
}

export async function remoteValidatesNodeKey(systemUuid, key) {
  return await request({
    url: '/bicAdmin/node/validateKey/' + systemUuid + '/' + key,
    method: 'get',
  })
}
